<ion-header-bar class="bar-top text-center">
    <div class="buttons">
        <nav-button class="back" ng-click="back()"></nav-button>
    </div>
    <h1 class="title">我的消息</h1>
    <div class="buttons">
        <div class="right big" ng-click="vm.showMsg=!vm.showMsg">...</div>
        <div class="msg-setting ng-cloak" ng-cloak ng-show="vm.showMsg">
            <i class="arrow"></i>
            <div class="link" ng-click="readAll()">全部标记为已读</div>
            <div class="link" ng-click="deleteAll()">全部清除</div>
        </div>
    </div>
</ion-header-bar>
<ion-view>
    <ion-content scroll="true" class="message">
        <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()">
        </ion-refresher>
        <div ng-class="{0:'row msg-item unread',1:'row msg-item readed'}[m.state]" ng-click="showMessage(m)" ng-repeat="m in vm.list">
            <div class="col col-100">
                <div class="title" ng-bind="m.content"></div>
                <div class="time" ng-bind="m.sendTimeString"></div>
            </div>
        </div>
        <ion-infinite-scroll ng-if="!vm.nodata" on-infinite="loadMore()" distance="1%">
        </ion-infinite-scroll>
    </ion-content>
</ion-view>
